<? if ($c = stack('name')) {

	$d = component_data($c);

	?><section id="cpn-<?=$c?>" class="cpn-profile"><?

		if (!gccLoggedIn()) {
			
			?><p><?=tc('You are not registered')?></p><?
			
		} else {
			?>

<style type="text/css">
#cpn-profile dd {
height:20px;
}
</style>


				<ul class="sub-menu"><li class="button active"><?=tc('Особисті дані')?></li><li class="button"><a href="/<?=$CONTEXT['lang_prefix']?>claim/show-sent"><?=tc('Мої звернення')?></a></li></ul>
				<fieldset>
					<ul class="sub-menu function">
<li><a href="/<?=$CONTEXT['lang_prefix']?>my/edit-<?=gccUserInfo('persontype_id')?>"><?=tc('Редагувати')?></a></li>
<li><a href="/<?=$CONTEXT['lang_prefix']?>register/change-login/"><?=tc('Змінити логін/e-mail')?></a></li>
<li><a href="/<?=$CONTEXT['lang_prefix']?>register/change-password/"><?=tc('Змінити пароль')?></a></li>
					</ul>
					<br><br>
					<h2 class="legend"><?=gccUserInfo('email')?></h2>
					
					<? if (gccUserInfo('persontype_id') == 'F') {?>

<table>
<tr>
	<td><?=tc('Full name')?></td>
	<td class="value"><?=gccUserInfo('fullname')?></td>
</tr><tr>
	<td><?=tc('Gender')?></td>
	<td class="value"><?=$d['gender_id'][gccUserInfo('gender')]?></td>
</tr><tr>
	<td><?=tc('Birth Year')?></td>
	<td class="value"><?=substr(gccUserInfo('birthday_formatted'),6,4)?></td>
</tr>
</table>

						<h2 class="legend"> <?=tc('Contact data')?> </h2>

<table>
<tr>
	<td><?=tc('Index')?></td>
	<td class="value"><?=gccUserInfo('fact_index')?></td>
</tr><tr>
	<td><?=tc('Address')?></td>
	<td class="value"><?=gccGeoToRootJoin(gccUserInfo('fact_geo_id'), true)?></td>
</tr><tr>
	<td></td>
	<td class="value"><?=gccUserInfo('fact_address')?></td>
</tr>
</table>

<table>
<tr>
	<td><?=tc('Contact phone')?></td>
	<td class="value short"><?=gccUserInfo('contactphone')?></td>
	<td><?=tc('Additional phone')?></td>
	<td class="value short"><?=gccUserInfo('contactphone2')?></td>
</tr>
</table>

						<h2 class="legend"> <?=tc('Additional data')?> </h2>

<table>
<tr>
	<td><?=tc('Category')?></td>
	<td class="value"><?=$d['category_id'][($t = gccUserInfo('category_id')) ? $t : $d['category_id_nope']]['name']?></td>
</tr><tr>
	<td><?=tc('Social status')?></td>
	<td class="value"><?=$d['socialstatus_id'][($t = gccUserInfo('socialstatus_id')) ? $t : $d['socialstatus_id_nope']]['name']?></td>
</tr>
</table>

					<? } else { ?>

<table>
<tr>
	<td><?=tc('Назва організації:')?></td>
	<td class="value"><?=gccUserInfo('fullname')?></td>
</tr><tr>
	<td><?=tc('Форма власності:')?></td>
	<td class="value"><?=$d['ownership'][gccUserInfo('ownership')]?></td>
</tr><tr>
	<td><?=tc('ЄДРПОУ:')?></td>
	<td class="value"><?=gccUserInfo('okpo')?></td>
</tr><tr>
	<td><?=tc('№ свідоцтва:')?></td>
	<td class="value"><?=gccUserInfo('certificatenumber')?></td>
</tr>
</table>


						<h2 class="legend"> <?=tc('Юридична адреса')?> </h2>

<table>
<tr>
	<td><?=tc('Індекс:')?></td>
	<td class="value"><?=gccUserInfo('low_index')?></td>
</tr><tr>
	<td><?=tc('Адреса:')?></td>
	<td class="value"><?=gccGeoToRootJoin(gccUserInfo('low_geo_id'), true)?></td>
</tr><tr>
	<td></td>
	<td class="value"><?=gccUserInfo('low_address')?></td>
</tr>
</table>

						<h2 class="legend"> <?=tc('Фактична адреса')?> </h2>

<table>
<tr>
	<td><?=tc('Індекс:')?></td>
	<td class="value"><?=gccUserInfo('fact_index')?></td>
</tr><tr>
	<td><?=tc('Адреса:')?></td>
	<td class="value"><?=gccGeoToRootJoin(gccUserInfo('fact_geo_id'), true)?></td>
</tr><tr>
	<td></td>
	<td class="value"><?=gccUserInfo('fact_address')?></td>
</tr>
</table>

<table>
<tr>
	<td><?=tc('Contact phone')?></td>
	<td class="value short"><?=gccUserInfo('contactphone')?></td>
	<td><?=tc('Additional phone')?></td>
	<td class="value short"><?=gccUserInfo('contactphone2')?></td>
</tr>
</table>

					<h2 class="legend"> <?=tc('Дані уповноваженої особи')?> </h2>

<table>
<tr>
	<td><?=tc('Last Name')?></td>
	<td class="value"><?=gccUserInfo('lastname')?></td>
</tr><tr>
	<td><?=tc('First name')?></td>
	<td class="value"><?=gccUserInfo('firstname')?></td>
</tr><tr>
	<td><?=tc('Middle Name')?></td>
	<td class="value"><?=gccUserInfo('middlename')?></td>
</tr><tr>
	<td><?=tc('Посада')?></td>
	<td class="value"><?=gccUserInfo('position')?></td>
</tr>
</table>

					<? } ?>

				</fieldset>

			<?
		}

		?><div class="clearer"></div><?
	?></section><?

	unstack();
}
